import httpx
with httpx.Client() as client:     #官网推荐with...as 使用方式
     result=client.get("http://www.techlabplt.com:8080/BD-PC/priceList")
     print(result)
#等价于以下代码
client=httpx.Client()
try:
  result=client.get("http://www.techlabplt.com:8080/BD-PC/priceList")
  print(result)
finally:
    client.close()
